package com.prs.crm.action.project;

import org.apache.struts2.convention.annotation.Action;
import org.courser.struts.BaseAction;
import org.courser.ui.PaginationSupport;

import com.prs.crm.context.AppContext;
import com.prs.crm.domain.project.Task;
import com.prs.crm.service.project.TaskService;

public class TaskHistoryAction extends BaseAction{

	private static final long serialVersionUID = 1L;
	
	private TaskService taskService;
	
	private Task task;
	
	private PaginationSupport pagination;

	public void setTaskService(TaskService taskService) {
		this.taskService = taskService;
	}

	public TaskService getTaskService() {
		return taskService;
	}

	public void setTask(Task task) {
		this.task = task;
	}

	public Task getTask() {
		return task;
	}

	public void setPagination(PaginationSupport pagination) {
		this.pagination = pagination;
	}

	public PaginationSupport getPagination() {
		return pagination;
	}
	
	/**
	 * 列出执行完的任务
	 */
	@Action("listExecuteEndTask")
	public String listExecuteEndTask()
	{
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getTaskService().listExecuteEndTask( pagination,
				AppContext.getAccountContext().currentUser()));
		return SUCCESS;
	}
	

	
	/**
	 * 所有任务信息，包括子任务
	 * @return
	 */
	@Action("taskFullInfo")
	public String taskFullInfo()
	{
		return SUCCESS;
	}
	
	@Action("viewTaskTree")
	public String viewTaskTree()
	{
		return SUCCESS;
	}
	
	@Action("viewTaskInfo")
	public String viewTaskInfo()
	{
		return SUCCESS;
	}
}
